<!--
 * @Description: 观察tokens结构
 * @Author: wangqi
 * @Date: 2021-05-04 19:49:21
 * @LastEditTime: 2021-05-04 20:01:24
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

<script type="module">
    import mustache from "./src/mustache.4.2.0.js";

    let templateStr = `<h2>我买了一个{{thing}}, 花了{{money}}元, 好{{mood}}啊! <h2>`;
    let templateStr1 = `<ul>
                            {{#liData}}
                                {{#isShow}} 
                                    <li>
                                        {{sname}} 的年龄：{{sage}},
                                        爱好是: {{#hobbies}}  <span>{{.}},</span>  {{/hobbies}}
                                    </li>
                                {{/isShow}}
                            {{/liData}}
                        </ul>`;

    let vmNode =  mustache.render(templateStr1, {});
    console.log(vmNode);

</script>

</html>